|
|
|
|
|
|
|
· How to use the Microsoft graph control to create graphs and charts of your data |
|
|
|
|
|
|
|
|
· How to use data-bound list boxes, data-bound combo boxes, and data-bound grids to create advanced data entry forms |
|
|
|
|
|
|
|
|
· How to make applications more solid with error trapping |
|
|
|
|
|
|
|
|
Here is a more detailed look at the topics covered in each lesson: |
|
|
|
|
|
|
|
|
Day 8
Selecting Data with SQL |
|
|
|
|
|
|
|
|
You learned in Day 8 how to create basic SQL statements that select data from existing tables. You learned that the most fundamental form of the SQL statement is the SELECT_FROM clause. This clause is used to select one or more columns from a table and display the results of in a result set, or view. |
|
|
|
|
|
|
|
|
You also learned about the optional clauses that you can add to the SELECT_FROM clause: |
|
|
|
|
|
|
|
|
· The WHERE clause: Used to limit the rows in the result set using logical comparisons (for example, WHERE Table.Name = "SMITH") and to link two tables in a single, nonupdatable, view (for example, WHERE Table1.Name = Table2.Name). |
|
|
|
|
|
|
|
|
· The ORDER BY clause: Used to control the order in which the result set is displayed (for example, ORDER BY Name ASC). |
|
|
|
|
|
|
|
|
· The GROUP BY clause: Used to create a subtotal result set based on a break column (for example, GROUP BY Name). |
|
|
|
|
|
|
|
|
· The HAVING clause: Used only with the GROUP BY clause, the HAVING clause acts as a WHERE clause for the GROUP BY subtotal clause (for example, GROUP BY Name HAVING SUM(SalesTotal)>1000). |
|
|
|
|
|
|
|
|
· The INNER JOIN clause: Used to join two tables together into a single, updatable result set. The INNER JOIN returns rows that have a corresponding match in both tables. |
|
|
|
|
|
|
|
|
· The LEFT JOIN and RIGHT JOIN: Used to join two tables into a single, updatable result set. The LEFT JOIN includes all records from the first (left-hand) table and all rows from the second table that have a corresponding match. The RIGHT JOIN works in reverse. |
|
|
|
|
|
|
|
|
· The UNION clause: Used to combine two or more complete SQL queries into a single result set (for example, SELECT * FROM Table1 UNION SELECT * FROM Table2). |
|
|
|
|
|
|
|
|
· The TRANSFORM_PIVOT clause: Used to create a cross-tab query as a result set (for example, TRANSFORM SUM(MonthlySales) FROM SalesTable GROUP BY Product PIVOT Month). |
|
|
|
|
|